modify regression to output beta