remove unused characters