add cookie function
merge