merge sort iterative method code fix and updates