cleaning up some numerical stuff for gaussians