builds out controller.