add open and close functions to make