renamed DEBUG to phaseDEBUG and use if (DEBUG(stuff))