fixed bug; optimized lexing