refactor cat/subcat