switched X to D for detectors