fixed some issues
defined logistic model