Solution for 1.b