change unit test format
fix more bugs in unit tests