add boolean to VisitFunc because of checking continue/break