added open and close methods to datasource interface.