lets use template for all kind of templates and basic case statement for dealing with the different extensions