Tweaked problem 6