It is something as simple as that.  But, you can move the for loop to inside the HandleCallback.  You should be able to grab the return value of "prepareBatch()" and then from there keep adding things to the batch.