@Override
    /**
     * performs the SimulationEvent
     * @return EventDone - the event that was performed with flag set to true if the event was actually performed
     */
    public EventDone performEvent(SimulationEvent reaction) {
        
         // specify the fromAgent in the case of infection or exposure
         // then use the performEvent method in the super class
        
         if ( reaction instanceof SIREventWithRate) {
            SIREventWithRate event = ((SIREventWithRate) reaction);
            SIREventType    etype  = event.getEventType();
            
            if ( (etype == SIREventType.INFECTION) || ( etype == SIREventType.EXPOSURE ) ) {
                Agent fromAgent             = event.getFromAgent();
                Agent toAgent               = event.getToAgent();
                
                if ((toAgent  !=  null) && (fromAgent == null)) {
                    // choose an infected neighbour to be the infector
                    List<Agent> nn = getIncomingNeighboursWithState((IndividualNetworkAgent)toAgent, IndividualStateType.INFECTED);
                    
                    fromAgent = (Agent)( IndividualBasedModel.getRandom() ).selectOneOf(nn);
                    
                    IndividualSimulationState infector = new IndividualSimulationState(fromAgent, IndividualStateType.INFECTED );
                    reaction.setInitialState(infector);
                } else {
                    System.out.println("NetworkOfIndividualsModel.performEvent - from and to agents not set correctly, why are you at this statement ?");
                }
            }
             
         }
         
         return (super.performEvent(reaction));
    }