added public void accept (visitor pattern implementation)