stub clustering procedure