changes update function