I wrote my own logistic regression algorithm