cleaned debug code