some whitespace removed
Switch background color with a function