implemented lexer