add ability to save cookie value with encode