correct some mistakes and add many test in test project