slightly modified track.f