Remove switch and use switchcompat