Refactor code
Refactor
Gen gaussian distribution function