improved parser/lexer