Added insertionSort() method, but can't figure out why add method throws exception