implemented merge sort, added tests.