debug the proper way

can turn on and off debugging now.