simplify logic in url checker