update projects sort on categories, and add test