dispatch & cookie handler