added visitor pattern
added visitor pattern