merge two maps with different priorities