Use the absolute value of the delta to prevent negative values resulting in a better match. By: Adam Thomas <aet2505@gmail.com>