add switchcompat