inject generator via constructor