added ability to specify scopes