add open and close