add events and errors