replace template with content