number of events should be an integer