some debug info here and there in the code,
 encoder data correction