solve problem with tests