template improvement

closes #44