added triple gauss, not optimized