modify BranchNode

add visited to BranchNode