unique the array of ids before creating vertices