update function advance