wanghao:add the networking code