1. Improving sample code