added some clustering stuff