sorting does not work sometimes, see the attached code.
for AMOUNT < 8, the tests work.
for AMOUNT >= 8, they fail. it looks like it completely "forgets" to sort, the results are in same order as they were added to the index.
obviously, sorting should work for any amount. :)
Thanks to Pavel Sviderski for discovering this bug and working on the tests.