some work on exercise 2, added visitor class, refactored stuff