#56 add batch support