added a method to define the 'open' functionality