Update download function