Updated code to include updation mechanism