I don't see any sorting here ... we need to use the same sorting method I used in Treasure:

https://github.com/ryanxcharles/treasure/blob/master/treasure.js