fix test for problem 40