added multiple sort, extra tests, docs