update only valid fields