Changed gaussian formula