prediction and correction added