add getCookie and setCookie method