#39 #40 add debug program and clean debug messages