using service locator to get RepositorySystem