outline of the task dispatcher coded