Added solution for question 3