remove useless if statement