Adding update code