Modified code to facilitate daysCount & speedFactor