Dispatch2 is similar to Dispatch1, but it dispatches based on the second argument instead of the first.