add open and close commands