This seems to be working according to the tests.