refine code, refine the handshake, refine the log of source_id