efficiency update to batch()