add batch support