Can somebody tell me how this algorithm deciphers what to flag?