add the function for change the cookie