replaced deprecated createGainNode with createGain