updated datastructer to have indexes for edges and triangles