some changes to events and event handler, revised documentation