remove test function
change sign of beta