modified some function to enhance the logistic function