optimize 2-elem char-set