delete useless entries