solve problem for stackoverflow