Added visitor pattern.