made it easier to change sampling rate