added support for cookie jar