add tests and solution for problem 37