corrected switch syntax error