add solution to the fifth problem