Behavior and the dynamics of epidemics