DUAL MODE PHASE DETECTION