added batchsize and threads changes