Adding dispatcher code