updates to get batches from db