exercises from chapter 5. please don't make medoc.