working on Gauss thm
done with simple version of Gauss's theorem