preliminary version of export template insertion. not yet ready.