debug and correction