improving useless code