Added solution of question 6