all cs code from my class (this is the second attempt to make the repo :P)