first working version of mass_export script.