added code for the export