fix some syntax mistakes, add total test case