removing eventdispatcher code