First version of dispatcher - lots more to do