implemented logistic growth algorithm