chapter 4 updated; encapsulation included