added recursive argument to get_attributes()