update cookie utility