add after_attributes_set hook