Source codes for lesson 6