added removeNode function