add dimming functionality