add open and pull function