add set_attributes to allow setting multiple attributes in various ways