Added code from lecture notes

mostly stuff from lecture_09_02, there's some undefined variables though