made the download feature more useable and robust