update cookie and store