Added template code