Fix spelling mistake
Add sort order to parameters
Add unit tests