Use switch instead of if/elseif/else