remove old code
only print debug if debug is on
set example code