so it's good to see what the possible bugs maybe.
The bug with that is that you were removing only a single row, not N of them. You need to call "listOfEntries.removeFirst()" N times if you want to remove the first N items in the list. A wiser program would also check first to see that the size of the list is >= N before trying to remove N items.