solve problem4
solve problem 5
update problem 5