set up a controller