wrap url fetches in if statements