Code Sample 22 (step 3)