added code for logistic regression - my own implementation