bugs in deleting edges. shouldn't come to this method