We have split the big function into two functions - batch_url and process_url as suggested.