finish problem_fortyeight with tests