Improved code sample