add functions on cookies