fix the functions of regression