Updated cookie script