This variable and the next should be declared after the the candidate nodes are chosen since they are used until after the candidates are selected.