update code sample