get single level hierarchy working