writing brightness update