Changed gaussian function