Refactor to use the service