delete useless characters