Refactor code to use bulkCreate for batch operation