adding check if has and cookie were found