refactor categories