Template Stack implemented