Replaced input-to-new-state with dispatch.