isSorted method revision written, about to delete