add functions to resolve symbol name in the scopes