add cookie check