fixed update function