Solution to first lesson 2 exercise