refactored inject and unnessecary returns