avoid generating switch() for versions if there is only one version