separate dispatcher from generator