* tree refactoring with visitor pattern step 2