fixed event handling
added helper for dialogue