removed the 'cookie' var and replaced it with Class