set up controller