Pre-filtering algorithm.

<p>Pre-filtering algorithm.</p>