Make best hit finder more general