implemented local hierarchical approach