updated rateTrack function