repositioned update function