add injection function which uses bang method for memory saving