refactored into node.rb