some bug fixes, but some bugs in lexer still remaining