refactor some scopes