initial pass at template mirroring script