Refactoring  to be injected as a boundary