autodimmer re-write