added clustering problem algorithm