Completed the problems from chapter 3