Added solutions for second and third sections