sorting charactor