replaced with something faster, and added this test.