remove useless code and function