Define sortByParams as a local class