slight modify of template