use transactions to make import faster