Added template pattern