added test code for export