fixes category logic and api