adjusted debug.h