Updated old code sample