renamed "invokeHandlers" to "dispatch"