First full implementation of setvertex