I moved this function otherwise the previous check (about the noiseLevel) is ineffective