a run-through test passed, fix some bugs. more works to do...