first attempt in the use of templates, for now done by hand