Update code snippet with latest