fix more connection bug
add some important comments
add comments