fixed variable name in update method