added open/close methods