improve lexer and parser