download function change