adding in some debug code, hidden behind preprocessor #ifs