implement the template makeing