added prefix search to getRandomAddress