updated node class: works with 1 or 2 nodes in validator