download url refactoring