Solution to the fourth challenge - level 3