Hm if you went with totalNumberOfLines like suggested above I'm guessing you could avoid this and just do `totalNumberOfLines = lines.length;` in the beginning?