exporter code in decent shape, working