changed syntax errors to return undefined, unified them with a constant