restructure and add logistic regression