new methods map_attributes and map_attribute