add event, factory, fix dispatcher