add solution for problem nine