refine implementation of findUrls