changing the batch insert approach