solve problem 005
solve problem 006