extended to regression