debugged problem with add method in SortedArrayList class