refactoring the AspectVisitor pattern