added clustering for each separate type