added cookie checks