make visit function virtual