Made the sample freq variable