debug phase