download function should handle multiple URLs