now has the ability to set the sample rate