setting up controller factories