added hierarchy, working prototype achieved.