corrected IF condition