added cookie counter
clean up