remove redundancy for code characters