change sample rate calculation