Working first gaussian distribution version