add solution Q5.2