adding in the debug code again (i took it out by accident)