v-clustering refactor