Solution for level 2.