generateTemplate: callback trial t+