Exercise from pg. 537 (i cheated and got the answer from the chapter end)