Added the inject() and replace() methods