add batch writing support to collections