clustering nested resursion function