removeNode method