Adding code for logistic regression