use own sampling gaussian code