Solution to homework 2 - Ekaterina