abstarcted verifySort function, cleaned up merge sort