Changed confidence logic to factor in "deviation"