Programming the controller