added remove node and remove edge functionality