finished 'sort catagory' and 'sort category group'