added ability to sort by category