some minor refactoring to move injection on a lower level