finish problem_sixteen with tests