Change conditional to switch statements