corrected debugging