calcConfidence optimisation try