remove syntax error in code snippet