add batch support and insurance
fix batches and add comments