got category sorting working!