Updated for temporal pathing with TEMP variable