implemented edge and vertex removal