Add function for refreshing rate.