solution to ques 2