Fixed Categories algorithm