write changes