remove useless logic