added logreg and modified it to use offset b