Update code sample to be more resource-y.