match extension with template