conversion to visitor pattern