added new_inject method, and added tests for its functionality