Completed insertionSort with break statement