add function code for EpidemicEvent class