added logistic regression class definition and fixed warnings