added mergesort to it