modified download script