change visitor to a class