implement batch