added accuracy by confidence functionality