refactor to use a locator service