Update the transient.py data function, less error prone in operation