added the inject function