First attempt at Gaussian implementation