dried code by separating out node.rb