corrected syntax error in if statement