Alphabet restrictions and better ordering for histogram