Edit checkSim to adapt to multiple nextNodes