only set attributes if they are not blank