removal of useless code