Solved chapter 3 problems: 2, 3, 4.