Added merge sort implementation