Added template pattern.