Working implementation of total_infection