implemented open/close handlers