implemented Dialog, created EventFactory