fix solution and unit tests