only set changed attributes