switch case for detectors