Solution of lesson 2