implement the solver for BETA, but the test for the solver is not passed.