added template and templatelist classes