improve code sample