most of epidemic model part of this commit