added deleteNode method