refact for just two nodes for now