Changed to keep sample rate in mind