removing useless if