scopes refactor