added support for scopes