Solution for 3.1