debug flag should be true