dispatchEvent solution complete