modify cookie check