added exportData function