added toggle debug