added some update code