new multi-way merge function added and tested results.