update gain on acorr function