solve problem7