add export template functionality