made getCookie and setCookie public methods