Added cookes checking