removing duplicate function
updating doc blocks
making sort customizable
fixing default sort order for tests
* granularizing tests for sorting
* making default asc