add refactoring of symtab code