add batch function
merge finished