fixing pseudocode for merge()