changed the structure of templates