added erase node and arc functions