updated trace generation