Tweaked code example.