fixed and removed old debugging