replace template with rendered template
complete