Added all of chapters 6 and 7 stuff