some refinements, event handling, additional functionality