rewrite of inject method, because I can