adding visitor pattern template