Add the 'dispatch' function.