changed parseCookie to protected