Testing batch function