extract template model