that could use some refactoring given the new node options :)