added basic syntax error handling