Sample code enhancements