basic implementation of scoped symbol table