Added solution of question 2