data reference changed to events, new events parameter