created a proper delta2tr function