Implemented sort by category.