slight cleanup of dispatcher code