early version of exporting working