removes useless condition