simple logistic gradiant function