readded update function