Tweaked problem 4.