fixing update method syntax