func for reading cookie values