first stab at making an export function
added the script loop. need to copy before rendering the template