solved problem with tests