added ability to set and record events