changes to download function to fix decryption