Updated code for corrections