added some documentation regarding events and errors