Ex2: Created a simple dimmer