toggle brightness / update brightness function

also first compile check