modified search to have multiple instances in each heirarchy