should have debugged it better