solve problem#34
solve problem#48