fixed some bugs added some tests
more bugfixes more tests
sorting works, tests updated
more tests for sorting in descending order