Flash filter

Double-checking algorithm for more efficient debugging.