visitor refactoring.