adding mergesort code