added handlers for various UI events