implemented data structures for merge sort