Switched for loop to while loop since we weren't using index.