improve merging sorted list