- added update function