make matching work better

Tested on darcy.

optimized fractal algorithm took 36.02 seconds