update function changed