initial commit, implemented up to chapter 3.3