update function syntax