adding cookie storage snippet