another method of batching