to merge
to merge again
add server open and chk reg
merge from HandsomeCharming-master