more generic behavior for updating a single attribute