gaussian solving