Modeling the Spread of Epidemics