added methods to add and remove edges and vertices