Add asset function with t!=0: tested, and memory leak checked