re-implemented hierarchy on client side