use batch calls; updated tests