killed a variable in the sortList function because it's accessible via size method. no need for or statements when what you really want is something less than or equal to 1, intellij suggested a foreach loop instead of my for loop.