Changed guassian formula.