Some working code. Need to fix probabilities to digits