updates to template to fix over writing data