saving exports to the database
make sure we don't iterate when variables is nil