added open method for Lexer