more simple algos for second and 3rd stage merging. names are pretty self explanatory.