updating the inject method