implement hierarchical categories