adding correction functionality