more visitor refactoring