Added sample rate variable