modify code and add tests
Merge pull request #44 from vaneyckt/allow-for-unsorted-statusses

modify code and add tests