Also, I see that you dropped your camelCase convention when you found out that 'switch' is a keyword. Really, keyword variants are not good choices for identifiers because of the possibility of human error, or confusion. Better, 'ledSwitch' or something...