How does the app detect an anomaly?