implement a very rough template.