implement recursive dimensional clustering