merged code

add batchtest
revised fetchurl and handle client which can specify mode