added inject test and appropriate code corrections