Resolve exercises from chapter 3