Added unit test, but not quite working.