template engine lexer
updated template engine