Update code for lesson 10 for proper output formatting