correct right bound in merge sort and excute it when left index is less than right one