modify the func of ReadFromConn and UnmarshalPkg