implement removeNode