better implementation of symbol table.