testing key() algorithm; passed.