added merge sort to DB