using bach to insert records