merge two objects into one