add code for Lex