add accept method for visitor