added active learning in batches