Implement merge sort prototpe