template pattern added