directly injecting  into factories