added debug support
added cookie