tweaked Lexer constructor