updates to regression math