setting up controller architecture