extract template