add ability to use cookie