moved 'set_attribute_type' to attributes