redo hardcoded stuff to determine the nodes, now random