combined last 4 IF statements