define the _open func