merge sort was implemented