fixed several bugs for setting parameters, begin to run test-cases.