unnecessary code removed
debug.h added