fixed bugs. etc. in logistic, added simple sigmoid