categories refactoring