knn and clustering added in the phasing NEW module