added small utility class for anomaly detection