remove unused noiseIndex variable