added function to return cookie value