Added batch support