small optimizations.
adding confidence measure, quick exit when the solution is at hand and we have confidence in our prior.