Added code to answer Q2