a MLE version for scramble strings