pulling controller into factories