Adjusted IF statements