added hierarchy for detail and scan