update solution with linear regression
add solution for logistic regressioin