sampling rate can take a fn to use to determine sampling rate.