added a scope stack