Update download url algorithm