updated logistic regression program with new api example