Adjusted code sample to reflect recent changes.