updating cluster.cpp