implemented shared vertices