refactored merge and merge insertion