attempt at re-creating the Inject method