Update code snippet with latest

@edewit @lfryc Could you review ?