Change if/elseif to switch(true)