The next thing I looked at was the section of code where you 'band pass' filter the matches into a temporary array.