implement dict merge