Implement the dispatcher.