rewrite of gaussian