replaced useless code