refactoring the 2 node example
my bad