better set_attributes support