Updated code sample