updated export to use flag for export