added functionality to dim display every second