flushing out some bugs
adding comparables to sort better
migrating changes from test case