use new batch function