sort the cates