adding cookie processing