vertex merging