Populate the buildCookie function