Made the merge subroutine private