improve download()