improve the SetRates function to include updating frame rate