test implementation for merge sort