reduce useless code