allow _discover_nearby to be parameterized