delete useless codes