added events and updated documentation