adds functioning update method