remove bad if statement