Added gaussian approximation function