created a couple of factories to shrink the controller