solution to ques 4