corrected if statement syntax