improve cookie class