somewhat working gauss