add code for question 1.4