added logistic regression classifier
further code refactoring