implement batch save