make a find_anomalies function