changes made and completely added merge sort code